package msi.gama.display.java3d.renderingObject;

import msi.gama.metamodel.shape.IShape;

import com.sun.j3d.utils.geometry.Box;
import com.sun.j3d.utils.geometry.Primitive;
import com.sun.j3d.utils.geometry.Sphere;

/**
 * minhvv, p18, IFI, TPE 01/2014 - 07/2014
 */

public class GeometryFactory {
	public static Primitive createPrimitive(IShape.Type type, float val) {
		Primitive primitive = null;

		switch (type) {
		case SPHERE:
			primitive = new Sphere(val);
			break;

		case CUBE:
			primitive = new Box(val, val, val, null);
			break;

		default:
			break;
		}

		return primitive;
	}
}
